]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: block show apps button checked signal when resetting state
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 16 Feb 2013 17:55:59 +0000 (12:55 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Sat, 16 Feb 2013 18:26:38 +0000 (13:26 -0500)
When we reset the state of the checked button due to the overview
showing and hiding, block the normal checked callback and immediately
switch to the workspaces page, so that windows seamlessly fade in.

https://bugzilla.gnome.org/show_bug.cgi?id=693974

js/ui/viewSelector.js

index 9a06c5c7663a19cc5c85a6d261d6a2668f426eab..a32ee7f8c302fde47e4b8fce7d528b3715d3c3ea 100644 (file)
@@ -57,6 +57,7 @@ const ViewSelector = new Lang.Class({
     _init : function(searchEntry, showAppsButton) {
         this.actor = new Shell.Stack({ name: 'viewSelector' });
 
+        this._showAppsBlocked = false;
         this._showAppsButton = showAppsButton;
         this._showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled));
 
@@ -247,12 +248,19 @@ const ViewSelector = new Lang.Class({
     },
 
     _onShowAppsButtonToggled: function() {
-        this._showPage(this._showAppsButton.checked ? this._appsPage
-                                                    : this._workspacesPage);
+        if (this._showAppsBlocked)
+            return;
+
+        this._showPage(this._showAppsButton.checked ?
+                       this._appsPage : this._workspacesPage);
     },
 
     _resetShowAppsButton: function() {
+        this._showAppsBlocked = true;
         this._showAppsButton.checked = false;
+        this._showAppsBlocked = false;
+
+        this._showPage(this._workspacesPage, true);
     },
 
     _onStageKeyPress: function(actor, event) {